// 任务调度API
import {postAxios,getAxios} from '@/lib/http';
  export const detectTaskApi = {
    // 查询任务列表
    getTaskByPage: (data) => {
      return postAxios('/task/page/query', data);
    },
    getStartTaskByPage: (data) => {
      return postAxios('/task/start/page/query', data);
    },
    // 添加任务
    addTask: (data) => {
      return postAxios('/task/add', data);
    },
    //更新任务
    updateTask: (data) => {
        return postAxios('/task/update', data);
      },
    //启动任务
    startTask: (taskId) => {
      return postAxios('/task/start/' + taskId);
    },
    //暂停任务
    pauseTask: (taskId) => {
      return postAxios('/task/pause/' + taskId);
    },
    //查询任务
    queryTaskById: (taskId) => {
      return getAxios('/task/query/' + taskId);
    },
    //删除任务
    deleteTaskById: (taskId) => {
      return postAxios('/task/' + taskId + '/delete');
    }
  };
